\hypertarget{classTQueueManagerProxy}{
\section{TQueueManagerProxy Class Reference}
\label{classTQueueManagerProxy}\index{TQueueManagerProxy@{TQueueManagerProxy}}
}
\hyperlink{classTQueueManagerProxy}{TQueueManagerProxy} handles communication with \hyperlink{classTQueueManager}{TQueueManager}.  


{\tt \#include $<$tqueuemanagerproxy.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classTQueueManagerProxy_ccd98ec09ac8522d0aa0349df12a9207}{TQueueManagerProxy} (void)
\begin{CompactList}\small\item\em Default Constructor. \item\end{CompactList}\item 
\hyperlink{classTQueueManagerProxy_f4ebb5c20eca0bb2de306df11ac69b2d}{TQueueManagerProxy} (const \hyperlink{classAddress}{Address} \&addr)
\begin{CompactList}\small\item\em Constructor specifying server \hyperlink{classAddress}{Address}. \item\end{CompactList}\item 
\hypertarget{classTQueueManagerProxy_5d2fe34ced723521250fd55aacc357e4}{
\hyperlink{classTQueueManagerProxy_5d2fe34ced723521250fd55aacc357e4}{$\sim$TQueueManagerProxy} (void)}
\label{classTQueueManagerProxy_5d2fe34ced723521250fd55aacc357e4}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
const \hyperlink{classAddress}{Address} \& \hyperlink{classTQueueManagerProxy_237be0182789e164ada7104881b38278}{getAddr} (void) const 
\begin{CompactList}\small\item\em Returns the current Worker \hyperlink{classAddress}{Address}. \item\end{CompactList}\item 
void \hyperlink{classTQueueManagerProxy_344a58708731c86e1c1a20b2c178f5e7}{setAddr} (const \hyperlink{classAddress}{Address} \&addr)
\begin{CompactList}\small\item\em Sets current Worker \hyperlink{classAddress}{Address} to the provided \hyperlink{classAddress}{Address}. \item\end{CompactList}\item 
void \hyperlink{classTQueueManagerProxy_921d8f9a6a0eb8d7734e5abbe7d9ae74}{setAddr} (const std::string \&IP, boost::uint16\_\-t port)
\begin{CompactList}\small\item\em Sets current \hyperlink{classManager}{Manager} \hyperlink{classAddress}{Address} to the provided IP and port. \item\end{CompactList}\item 
int \hyperlink{classTQueueManagerProxy_7d35dcec5546c80b466cee734ea986db}{enqueue} (const \hyperlink{classTaskDescriptor}{TaskDescriptor} \&ts)
\begin{CompactList}\small\item\em Ask the Worker to add provided \hyperlink{classTaskDescriptor}{TaskDescriptor} into its queue. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\hyperlink{classTQueueManagerProxy}{TQueueManagerProxy} handles communication with \hyperlink{classTQueueManager}{TQueueManager}. 

In order to communicate with a Worker, a \hyperlink{classManager}{Manager} needs a \hyperlink{classTQueueManagerProxy}{TQueueManagerProxy}. Manager-Worker interaction consist in \hyperlink{classTQueueManagerProxy_7d35dcec5546c80b466cee734ea986db}{enqueue()} call.\par
 Through \hyperlink{classTQueueManagerProxy_7d35dcec5546c80b466cee734ea986db}{enqueue()} a \hyperlink{classManager}{Manager} is able to push into Worker \hyperlink{classTaskDescriptor}{TaskDescriptor} queue a new element.\par
 \hyperlink{classTQueueManagerProxy}{TQueueManagerProxy} uses an \hyperlink{classUDPClient}{UDPClient} to send \hyperlink{classTQueueManagerProxy_7d35dcec5546c80b466cee734ea986db}{enqueue()} requests. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classTQueueManagerProxy_ccd98ec09ac8522d0aa0349df12a9207}{
\index{TQueueManagerProxy@{TQueueManagerProxy}!TQueueManagerProxy@{TQueueManagerProxy}}
\index{TQueueManagerProxy@{TQueueManagerProxy}!TQueueManagerProxy@{TQueueManagerProxy}}
\subsubsection[TQueueManagerProxy]{\setlength{\rightskip}{0pt plus 5cm}TQueueManagerProxy::TQueueManagerProxy (void)}}
\label{classTQueueManagerProxy_ccd98ec09ac8522d0aa0349df12a9207}


Default Constructor. 

\begin{Desc}
\item[Note:]This should not be used. \end{Desc}
\hypertarget{classTQueueManagerProxy_f4ebb5c20eca0bb2de306df11ac69b2d}{
\index{TQueueManagerProxy@{TQueueManagerProxy}!TQueueManagerProxy@{TQueueManagerProxy}}
\index{TQueueManagerProxy@{TQueueManagerProxy}!TQueueManagerProxy@{TQueueManagerProxy}}
\subsubsection[TQueueManagerProxy]{\setlength{\rightskip}{0pt plus 5cm}TQueueManagerProxy::TQueueManagerProxy (const {\bf Address} \& {\em addr})}}
\label{classTQueueManagerProxy_f4ebb5c20eca0bb2de306df11ac69b2d}


Constructor specifying server \hyperlink{classAddress}{Address}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]Server \hyperlink{classAddress}{Address}. \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\hypertarget{classTQueueManagerProxy_237be0182789e164ada7104881b38278}{
\index{TQueueManagerProxy@{TQueueManagerProxy}!getAddr@{getAddr}}
\index{getAddr@{getAddr}!TQueueManagerProxy@{TQueueManagerProxy}}
\subsubsection[getAddr]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Address} \& TQueueManagerProxy::getAddr (void) const}}
\label{classTQueueManagerProxy_237be0182789e164ada7104881b38278}


Returns the current Worker \hyperlink{classAddress}{Address}. 

\begin{Desc}
\item[Returns:]A constant reference to private member \_\-addr. \end{Desc}
\hypertarget{classTQueueManagerProxy_344a58708731c86e1c1a20b2c178f5e7}{
\index{TQueueManagerProxy@{TQueueManagerProxy}!setAddr@{setAddr}}
\index{setAddr@{setAddr}!TQueueManagerProxy@{TQueueManagerProxy}}
\subsubsection[setAddr]{\setlength{\rightskip}{0pt plus 5cm}void TQueueManagerProxy::setAddr (const {\bf Address} \& {\em addr})}}
\label{classTQueueManagerProxy_344a58708731c86e1c1a20b2c178f5e7}


Sets current Worker \hyperlink{classAddress}{Address} to the provided \hyperlink{classAddress}{Address}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]The provided \hyperlink{classAddress}{Address}. \end{description}
\end{Desc}
\hypertarget{classTQueueManagerProxy_921d8f9a6a0eb8d7734e5abbe7d9ae74}{
\index{TQueueManagerProxy@{TQueueManagerProxy}!setAddr@{setAddr}}
\index{setAddr@{setAddr}!TQueueManagerProxy@{TQueueManagerProxy}}
\subsubsection[setAddr]{\setlength{\rightskip}{0pt plus 5cm}void TQueueManagerProxy::setAddr (const std::string \& {\em IP}, \/  boost::uint16\_\-t {\em port})}}
\label{classTQueueManagerProxy_921d8f9a6a0eb8d7734e5abbe7d9ae74}


Sets current \hyperlink{classManager}{Manager} \hyperlink{classAddress}{Address} to the provided IP and port. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em IP}]Server IP address. \item[{\em port}]Server port. \end{description}
\end{Desc}
\hypertarget{classTQueueManagerProxy_7d35dcec5546c80b466cee734ea986db}{
\index{TQueueManagerProxy@{TQueueManagerProxy}!enqueue@{enqueue}}
\index{enqueue@{enqueue}!TQueueManagerProxy@{TQueueManagerProxy}}
\subsubsection[enqueue]{\setlength{\rightskip}{0pt plus 5cm}int TQueueManagerProxy::enqueue (const {\bf TaskDescriptor} \& {\em ts})}}
\label{classTQueueManagerProxy_7d35dcec5546c80b466cee734ea986db}


Ask the Worker to add provided \hyperlink{classTaskDescriptor}{TaskDescriptor} into its queue. 

This method sends the provided \hyperlink{classTaskDescriptor}{TaskDescriptor} to \hyperlink{classTQueueManager}{TQueueManager} module via UDP, using boost asio and serialization utilities.

\begin{Desc}
\item[Note:]As long as the service offered is best effort in this stage of development no delivery warranties are provided.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ts}]The provided \hyperlink{classTaskDescriptor}{TaskDescriptor}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Zero if operation successful, otherwise an error code. \end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
\hyperlink{tqueuemanagerproxy_8h}{tqueuemanagerproxy.h}\item 
\hyperlink{tqueuemanagerproxy_8cpp}{tqueuemanagerproxy.cpp}\end{CompactItemize}
